<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var ws = new WebSocket("ws://192.168.1.104:8081/socket/connect?empl_code=101&app_secret=123")
        ws.onopen = function () {
            console.log('=============open-------------')
            ws.send(JSON.stringify({
                action: 'HIS_CALL',
                data: {
                    reg_code: '123456'
                }
            }))
        }
        ws.onmessage = function (event) {
            console.log('=============onmessage-------------', event)
        }
        ws.onerror = function (event) {
            console.log('=============onerror-------------', event)
        }
        ws.onclose = function () {
            console.log('=============onclose-------------')
        }
    </script>
</head>
<body>

</body>
</html>